from datetime import time, datetime


# 字符串转时间格式
def strToTime(timeStr):
    return datetime.strptime(str(timeStr),'%Y-%m-%d %H:%M:%S')

# 时间格式转字符串
def timeToStr(time):
    return time.strftime('%Y-%m-%d %H:%M:%S')